/*
** 1316.c
** 
** Made by (seakage2h)
** Login   <seakage2h@seakage2h-ubuntu>
** 
** Started on  Mon Sep 29 20:55:41 2008 seakage2h
** Last update Sun May 12 01:17:25 2002 Speed Blue
*/

/* #include "1316.h" */
#include <stdio.h>

int main()
{
     int can[10036];		/* candidate integers */
     int b3, b2, b1, b0, i;

     for(i = 0; i < 10036; i++)
	  can[i] = 1;
     
     for(b3 = 0; b3 < 10; b3++)
	  for(b2 = 0; b2 < 10; b2++)
	       for(b1 = 0; b1 < 10; b1++)
		    for(b0 = 0; b0 < 10; b0++)
			 can[1001*b3 + 101*b2 + 11*b1 + 2*b0] = 0;

     for(i = 1; i < 10000; i++)
	  if (can[i])
	       printf("%d\n", i);
     return 0;
}

